<?php
namespace home\controller;
use home\controller\HomeBaseController;

class UserController extends HomeBaseController{
    public function __construct()
    {
        parent::__construct();
    }

    public function indexAction()
    {
        // php如何获取json格式的请求数据
        // 先从请求中获取原始数据
        $json = file_get_contents('php://input'); 
        // 再将其转换为 PHP 变量
        $data = json_decode($json, true);
        debug_dump($data);
//        echo 'index';
    }
    
    public function updatepasswordAction()
    {

        $content = load_model('content_model');
        $row = $content->get_one(['uid'=>'2665031']);

        $article_model = load_model('article_model');
        $r = $article_model->get_one(['article_id'=>'201909130']);

        $row = $content->get_one(['uid'=>'2665031']);
        $cache = load_class('cache');
        $cache->set('nnnnn',456789);
        echo $cache->get('nnnnn');
//        $cache->clean();
//        print_r($row);
        exit;
        echo escape("<hr><iframe src=baidu.com><meta '../>");
    }
}